use super::ort_backend::YOLOTask;

pub struct Config {
    /// ONNX model path :: /workspace/model/yolov8m.onnx
    pub model: String,

    /// device id :: 0
    pub device_id: u32,

    /// using TensorRT EP :: false
    pub trt: bool,

    /// using CUDA EP :: false
    pub cuda: bool,

    /// input batch size :: 1
    pub batch: u32,

    /// trt input min_batch size :: 1
    pub batch_min: u32,

    /// trt input max_batch size :: 32
    pub batch_max: u32,

    /// using TensorRT --fp16 :: false
    pub fp16: bool,

    /// specify YOLO task  :: None
    pub task: Option<YOLOTask>,

    /// num_classes :: Some(80)
    pub nc: Option<u32>,

    /// num_keypoints :: None
    pub nk: Option<u32>,

    /// num_masks :: None
    pub nm: Option<u32>,

    /// input image width :: 640
    pub width: Option<u32>,

    /// input image height :: 640
    pub height: Option<u32>,

    /// confidence threshold :: 0.3
    pub conf: f32,

    /// iou threshold in NMS :: 0.45
    pub iou: f32,

    /// confidence threshold of keypoint :: 0.55
    pub kconf: f32,

    /// plot inference result and save :: false
    pub plot: bool,

    /// check time consumed in each stage :: false
    pub profile: bool,
}
/// 默认值填充
impl Default for Config {
    fn default() -> Self {
        Config { 
            model: String::from("/workspace/model/yolov8m.onnx"), 
            device_id: 0, 
            trt: false, 
            cuda: false, 
            batch: 1, 
            batch_min: 1, 
            batch_max: 32, 
            fp16: false, 
            task: None, 
            nc: Some(80), 
            nk: None, 
            nm: None, 
            width: Some(640), 
            height: Some(640), 
            conf: 0.3, 
            iou: 0.45, 
            kconf: 0.55, 
            plot: false, 
            profile: false,
        }
    }
    
}
